feat(gfi): migrate plugin - #447
Conversation
58e73f6 to
f941649
Compare
bb7336c to
6a3129e
Compare
|
The usually helpful variables (map, stores, etc.) are auto-exported as global variables for use with the browser's devtools in snowbox.
acbf752 to
425cfdb
Compare
# Conflicts: # examples/snowbox/services.js
There was a problem hiding this comment.
- Please add an example to
iceberg; this maybe should include an example with a layer where the feature list is not being used - There should be no horizontal scrollbar if no features are available

- Some things are missing / quite different with the featureList; some parts are connections with the markers feature. This includes:
- When hovering an element in the feature list, the feature is highlighted in the map with the hover style
- When hovering an element in the map, the feature is highlighted in the feature list (previously green); when hovering a clustered feature, all features that are part of the cluster are highlighted
- If I select a feature in the map, it is selected in the feature list
- If I select a feature in the feature list, the corresponding marker gets the selected style; currently, a yellow dot is being displayed
- If I select a feature in the feature list, the map should be centered on that feature
- If a feature is not selectable because of the configured
isSelectablefunction, it is not being shown in the feature list
The list may not be complete, so please take a look at Meldemichel regarding the various things mentioned above.
I'll be taking a look at the components and stores once you've tackled these things.
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
Using shallowRef only does not reach this effect here, especially for the nested OpenLayers objects.
|
Every point was (hopefully) addressed again, including the aspects discussed in person. |
Co-Authored-By: GPT-5.6 Sol
|
The amount of displayed features seems to be off by a lot compared to https://static.hamburg.de/kartenclient/prod/. |
| @@ -0,0 +1,168 @@ | |||
| <template> | |||
| <p class="kern-subline kern-subline--small"> | |||
There was a problem hiding this comment.
This element should not have any padding if the nav is not rendered.
| } | ||
| } | ||
|
|
||
| .ol-overlay-container.ol-selectable { |
There was a problem hiding this comment.
Please add a comment for which situation this is required.
| export * from './utils/export/plugin' | ||
| export * from './utils/export/store' | ||
|
|
||
| export { isVisible } from '@/lib/invisibleStyle' |
There was a problem hiding this comment.
Why should a lib-function be re-exported from the core?
There was a problem hiding this comment.
It is used at https://github.com/Dataport/polar/blob/vue3/migrate-plugin-gfi/examples/snowbox/index.js#L454
As there is a usage in our example client, there is surely also a valid usage for real-world clients.
| {{ | ||
| gfiStore.title | ||
| }} |
There was a problem hiding this comment.
Why does the linter autoformat that to three lines?
|
|
||
| .action-bar-group { | ||
| display: flex; | ||
| gap: var(--kern-metric-space-default); |
There was a problem hiding this comment.
| gap: var(--kern-metric-space-default); | |
| gap: var(--kern-metric-space-small); |
Inline with the +- and --buttons in routing.
| value: 'Wert', | ||
| }, | ||
| property: { | ||
| export: 'Export als PDF', |
There was a problem hiding this comment.
This does not really seem to fit as exportProperty does not declare what kind of export is present.
| </KernButton> | ||
| <KernButton | ||
| class="kern-btn--tertiary" | ||
| icon="kern-icon--close" |
There was a problem hiding this comment.
Previously, the icon and the ariaLabel depended whether featureList is used or not. This should stay like this.
| class="kern-btn--tertiary" | ||
| icon="kern-icon--close" | ||
| :label-sr-only="true" | ||
| @click="gfiStore.selectedFeatures = markRaw({})" |
There was a problem hiding this comment.
markRaw is unnecessary for shallowRefs. This can be removed here and in GfiFeatureList.ce.vue and list.ts
There was a problem hiding this comment.
Please also remove the now "unused" imports
| const cluster = (layer.getSource() as VectorSource) | ||
| .getFeatures() | ||
| .find((candidate: Feature) => candidate.get('features').includes(feature)) | ||
| const source = layer.getSource() as VectorSource | ||
| const cachedCluster = clusterByFeature.get(feature) | ||
| const cluster = | ||
| cachedCluster && | ||
| source.hasFeature(cachedCluster) && | ||
| cachedCluster.get('features').includes(feature) | ||
| ? cachedCluster | ||
| : source | ||
| .getFeatures() | ||
| .find((candidate: Feature) => | ||
| candidate.get('features').includes(feature) | ||
| ) | ||
|
|
||
| if (!(cluster instanceof Feature)) { | ||
| throw new Error( | ||
| '@polar/lib-get-cluster: No cluster could be found for the given feature.' | ||
| ) | ||
| } | ||
| clusterByFeature.set(feature, cluster) | ||
| // The given feature should be the last in the array, as it the one "above" all thus added last | ||
| cluster.set('features', [ | ||
| ...cluster.get('features').filter((f: Feature) => f !== feature), | ||
| feature, | ||
| ]) | ||
| const clusterFeatures = cluster.get('features') as Feature[] | ||
| if (clusterFeatures.at(-1) !== feature) { | ||
| cluster.set( | ||
| 'features', | ||
| [...clusterFeatures.filter((f) => f !== feature), feature], | ||
| true | ||
| ) | ||
| } |
There was a problem hiding this comment.
This has been working properly since January 2024 and I don't see the new solution to be easier to read.
Why is this change necessary?
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>
There was a problem hiding this comment.
Here's a patch that
a) changes kern-heading-medium to kern-title like https://www.kern-ux.de/komponenten/card intends
b) restructures the CSS
| background-color: #dff0dd; | ||
| } | ||
|
|
||
| &:hover { | ||
| border-radius: var(--kern-metric-border-radius-default); | ||
| border-color: #3fa535; |
There was a problem hiding this comment.
Both have to use the oklch equivalent
Co-authored-by: Pascal Röhling <73653210+dopenguin@users.noreply.github.com>

Summary
Migrate the GFI plugin.
Instructions for local reproduction and review
Additional hints
requestGfi*were migrated as-is and do not need to be reviewed therefore.Relevant tickets, issues, et cetera
Closes #368